package com.cjm.one.goods.client;

import com.cjm.one.common.constant.ServerConstants;
import com.cjm.one.common.result.Result;
import com.cjm.one.model.goods.entity.GoodsUnit;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = ServerConstants.SERVER_ONE_GOODS)
public interface GoodsUnitClient {
    @GetMapping("/admin/goods/unit/list")
    @Operation(summary = "商品单位列表")
    Result<List<GoodsUnit>> list();

    @PostMapping("/admin/goods/unit")
    @Operation(summary = "添加商品单位")
    Result<Boolean> add(@RequestBody  GoodsUnit goodsUnit);
    @DeleteMapping("/admin/goods/unit/{id}")
    @Operation(summary = "删除商品单位")
    Result<Boolean> delete(@PathVariable Long id);
}
